<%@ page language="java" import="java.util.*,com.taobao.top.demo.dataobject.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>" />
    <title>
      商品销售属性图片
    </title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="pragma" content="no-cache" />
    <meta http-equiv="cache-control" content="no-cache" />
    <meta http-equiv="expires" content="0" />
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3" />
    <meta http-equiv="description" content="This is my page" />
    <style type="text/css">
      body { background-color:#fff; color:#48b9ef; padding:10px 0 10px 0; font-family: Arial, Helvetica, sans-serif;
      font-size: 13px; } .tb { background-color:#fff; color:#48b9ef; padding:10px 0 10px 0; font-family: Arial,
      Helvetica, sans-serif; font-size: 13px; }
    </style>
  </head>
  <body>
    <%
    String iid = (String)request.getAttribute("iid");
    Item item = (Item)request.getAttribute("item");
    %>
    <br />
    <br />
    <a href="operation/addPropImg.jsp?iid=<%=iid %>&cid=<%=item.getCid() %>">
      添加新属性图片
    </a>
    <br />
    <br />
    <%
    if(item != null){
      %>
      title:
      <%=item.getTitle() %>
      <br />

      属性图片:
      <table class="tb">
        <%
        List<PropImg> propImgs = item.getPropImgs();
        if(propImgs != null){
          PropImg propImg= null;
          for(int j = 0; j < propImgs.size(); j++){
            propImg = propImgs.get(j);
            %>
            <tr>
              <td>
                <img height="40px" width="40px" src="<%=propImg.getUrl() %>"/>
              </td>
              <td>
                <%=propImg.getNameAlias() %>
              </td>
              <td>
                <a 
                    href="operation/updateImg.jsp?iid=<%=iid %>&properties=<%=propImg.getProperties() %>&id=<%=propImg.getPropimgId() %>">

                  修改
                </a>
              </td>
            </tr>
            <%
          }
        }
        %>
      </table>
      <%
    }
    %>
  </body>
</html>
